let fn=expand('%:p')
let fl=getfsize(fn)
if 0==fl || (-1==fl && 1==line('$') && 0==get(getbufline('.', '$'), 0))
	"set fenc=utf-8 "bomb/nobomb
	let sExt=expand('%:e')
	if sExt=='java'
		let sClass=expand('%:t')
		let len=strridx(sClass, '.java')
		let sClass=strpart(sClass, 0, len)
		call append(0,'//package ;')
		call append(1,'')
		call append(2,'//import static java.lang.System.out;')
		call append(3,'')
		call append(4,'')
		call append(5,'public class '.sClass.' {')
		call append(6,'static public void main(String[] args) {')
		call append(7,'}')
		call append(8,'}')
		exec 'silent! normal gg=G'
		call cursor(8,1)
	endif
endif

if exists("b:ft_java_hx") | finish | endif
let b:ft_java_hx=1

setl fdm=syntax fdl=9

nn <buffer> <silent> ; :call setline('.', getline('.').';')<CR>
"ino <buffer> <silent> { <C-R>=hexing#c_hx#HX_keymap_Dkh()<CR>
"ino <buffer> <silent> : <C-R>=hexing#c_hx#HX_keymap_Colon()<CR>
"ino <buffer> <silent> <CR> <C-R>=pumvisible() ? "\<lt>C-Y>\<lt>C-R>=hexing#hexing_autoload#HX_setion_complete()\<lt>CR>" :  "\<lt>C-R>=hexing#c_hx#HX_keymap_Enter()\<lt>CR>"<CR>
"ino <buffer> <silent> <Esc> <C-R>=hexing#c_hx#HX_keymap_Escape()<CR>
